<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<fmt:requestEncoding value="utf-8"/>
<jsp:useBean id="bvo" class="jech913.model.BoardVO"/>
<jsp:setProperty name="bvo" property="*"/>

<!-- 수정하는 sql -->
<sql:update dataSource="jdbc/oracle11xe">
	update BOARD
	set bdtitle = ?, contents = ?, regdate=sysdate
	where bdno = ?
		
	<sql:param value="${bvo.bdtitle}"/>
	<sql:param value="${bvo.contents}"/>
	<sql:param value="${bvo.bdno}"/>
</sql:update>

<c:redirect url="view.jsp?bdno=${bvo.bdno}"/>

<c:if test="${empty sessionScope.login}">
	<c:redirect url="login.jsp"/>
</c:if>